<template>
  <div class="button">
     <Rain-ImagePreview v-model="visible" :list='list' ></Rain-ImagePreview>
     <div class="show-title" >基础用法</div>
     <div class="show-content" > 
        <div v-for="(item,index) in list" :key="index" >
          <img :src="item" @click="show(item)"  >
          </div>
     </div>
  </div>
</template>

<script lang="ts">
import { Component, Vue } from "vue-property-decorator";
@Component({
  components: {

  }
})
export default class Home extends Vue {
  // data 
  visible = false
  list:Array<any> = [
    require('@/assets/preview/01.png'),
    require('@/assets/preview/02.png'),
    require('@/assets/preview/03.png'),
    require('@/assets/preview/04.png')
  ]
  // method
  show(){
    this.visible = true
  }
}
</script>
<style lang="scss" scoped>
$gray:#999999;
.show-title {
  text-align: left;
  font-size: 14px;
  padding: 16px;
  color: #999999;
}
.show-content{
  display: flex;
  flex-direction: row;
  align-items:center;
  flex-wrap: wrap;
  padding: 10px;
  img{
    width: 100px;
    margin: 5px;
  }
}
</style>
